
{extend name="index@common/base"/}
{block name="style"}
{/block} {block name="body"}
<div class="layui-body layui-tab-content index-body" id="cont">
    <div class="park-navigation">
        <div class="navigation-icon">
            <i class="fa {$breadCrumb[0]['icon']}"></i>
        </div>
        <div class="navigation-menu">
            <h2>{$breadCrumb[0]['title']}</h2>

        </div>
    </div>
    <div class="park-content">
        <div class="content-title">
            <div class="title col-9">
                <h3>{$breadCrumb[1]['title']}</h3>
                <form class="layui-form" action="{:url('rehearse/evaluate/search')}" onsubmit="return false;">
                    <button class="search-btn" lay-submit lay-filter="search"><img src="__STATIC__/img/base/topsearch01.png"></button>
                    <input class="search-input" name="keyword" type="text" placeholder="事件名称" id="keyword"  autocomplete="off">
                    <div class="date-duration">
                        <div class="layui-input-inline">
                            <input type="text" name="start" id="start" autocomplete="off" class="search-input" placeholder="开始时间">
                        </div>
                        <div class="layui-input-inline">
                            <span>--</span>
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="end" id="end" autocomplete="off" class="search-input" placeholder="结束时间">
                        </div>
                    </div>
                </form>
            </div>
            <div class="tool col-1">
                <button id="reload"><i class="fa fa-refresh"></i></button>
            </div>
        </div>
        <div class="layui-content" lay-accordion id="record" data-url="{:url('rehearse/evaluate/index')}">
        </div>
    </div>
</div>
{/block}
{block name="script"}

<script type="text/javascript" src="__JS__/rehearse/evaluate.js"></script>


<script id="tableTemplate" type="text/html">

    {{# for(var i = 0;i < d.length; i++){ }}
    <div class="maintab">
        <table class="record-table">
            <thead>
            <tr>
                <th>事件</th>
                <th>救援时间</th>
                <th>参与救援单位</th>
                <th>总耗时</th>
                <th>指挥人或单位</th>
                <th>专家评分</th>
                <th ></th>
            </tr>
            </thead>
            <colgroup>
                <col width="30%">
                <col width="10%">
                <col width="10%">
                <col width="10%">
                <col width="15%">
                <col width="10%">
            </colgroup>
            <tbody>
            <tr>
                <th class="content">
                    {{# if(d[i].filePath){ }}
                    <a  href="__PUBLIC__{{d[i].filePath}}" style="color:#1e9fff">{{d[i].title}}</a>
                    {{# }else{ }}
                    {{d[i].title}} <span style="color: red">(未上传)</span>
                    {{# } }}
                </th>
                <th class="content"><p>{{d[i].execTime}}</p>



                </th>
                <th class="content">{{d[i].attendUnit}}</th>
                <th class="content">{{d[i].timeConsuming}}</th>
                <th class="content">{{d[i].execStaffId}}</th>
                <th class="content" style="line-height:20px;">
					<div class="star" data-score={{d[i].score}}></div>
					<p style="padding-left:20%">{{d[i].score}}</p>
				</th>
                <th  style="text-align:center;">

                    <a class="layui-btn btn-edit evaluate-record"  data-url="{:url('rehearse/evaluate/evaluateRecord')}?recordId={{d[i].id}}&eventId={{d[i].eventId}}"><i class="fa fa-list"></i></a>


                </th>
            </tr>
            </tbody>
        </table>
        {{# if(d[i].records != null){ }}
        <div class="maintab">
            <table class="detail-table">
                <colgroup>
                    <col width="5%">
                    <col width="15%">
                    <col width="20%">
                    <col width="10%">
                    <col width="10%">
                    <col width="30%">
                </colgroup>
                <tbody>
                {{# for(var j = 0;j < d[i].records.length; j++){ }}
                <tr>
                    <td style="text-align:center">
                        <p>{{d[i].records[j].stepIndex}}</p>
                    </td>
                    <td>
                        <p><b>执行项目: </b>{{d[i].records[j].actionId}}</p>
                    </td>
                    <td>
                        <p><b>行动内容: </b>{{d[i].records[j].stepDesc}}</p>
                    </td>

                    <td>
                        {{# if (d[i].records[j].unit){}}
                        {{# if (d[i].records[j].unit.chargePerson==0){}}
                        <p><b>责任人: 安监端 </b></p>
                        {{# } }}
                        {{# if (d[i].records[j].unit.chargePerson!=0){}}
                        <p><b>责任人: </b>{{d[i].records[j].unit.chargePerson}}</p>
                        {{# } }}
                        {{# } }}
                        {{# if (d[i].records[j].unit==null) { }}
                        <p><b>责任人:未填写</p>
                        {{# } }}
                    </td>
                    <td>
                        <p><b>执行状态: </b>

                            {{# if(d[i].records[j].implementStatus==0){ }}未执行{{# } }}
                            {{# if(d[i].records[j].implementStatus==1){ }}执行中{{# } }}
                            {{# if(d[i].records[j].implementStatus==2){ }}已执行{{# } }}
                        </p>
                    </td>
                    <td>
                        <p><b>评价: </b>{{d[i].records[j].evaluate}}</p>
                    </td>
                    <td style="text-align:center">
						<span>
                        	<a class="layui-btn btn-config evaluate-recorddetail" id="evaluate_{{d[i].records[j].id}}" data-url="{:url('rehearse/evaluate/evaluateRecorddetail')}?recorddetailId={{d[i].records[j].id}}&recordId={{d[i].id}}"><i class="fa fa-edit"></i></a>
                    	</span>
					</td>
                </tr>
                {{# } }}
                </tbody>
            </table>

        </div>
        {{# } }}
    </div>
    {{# } }}
</script>


{/block}
